<template>
  <div class="list">
    <div class="list-page">
      <h3>
        <p>列表</p>
        <!-- <span>20202020</span> -->
      </h3>
      <ul>
         <li v-for='(item,index) in data' :key='index'>
            <a :href="keyUrl+item.url">
              <span class="dot"></span>
              <p>{{item.title}}</p>
              <span class="time">{{item.pubdate}}</span>
            </a>
          </li>
      </ul>
    </div>
    <div class="list-img">
      <h3>精彩瞬间</h3>
      <ul>
        <li v-for='(item,index) in data.slice(0,6)' :key='index'>
          <a :href="keyUrl+item.url">
            <img :src="keyUrl+item.image">
          </a>
        </li>
      </ul>
      </ul>
    </div>
  </div>
</template>

<script>
var api = require('@/request/api') 
  export default {
    data() {
      return { 
        data:[],
      };
    },
    methods: {

    },
    mounted() {
      let params = this.$route.params.api;
      api[params]().then((v)=>{
        this.data = v.data
      })
    }
  };

</script>

<style lang='scss' scoped>
 .home-wrap {
    width: 100%;
    height: 100%;

    .swiper {
      width: 100%;
      height: 100%;
    }
  }
  @import url(../assets/css/list.css);
</style>

